﻿using System.Data;

namespace Codemonk.Common.Data
{
    public interface IDbDataReaderQueryable
    {
        IDataReader ExecuteReader(IDbConnection connetion, string cmdtext, CommandType cmdtype = CommandType.Text, CommandBehavior behaivor = CommandBehavior.Default, params IDataParameter[] paras);

        IDataReader ExecuteReader(IDbConnection connection, string cmdtext, DbParameterBuilder builder, CommandType cmdtype = CommandType.Text, CommandBehavior behaivor = CommandBehavior.Default);

        IDataReader ExecuteReader<T>(IDbConnection connection, string cmdtext, DbParameterBuilder<T> builder, CommandType cmdtype = CommandType.Text, CommandBehavior behaivor = CommandBehavior.Default) where T : IDataParameter, new();

        IDataReader ExecuteReader(string cmdtext, CommandType cmdtype = CommandType.Text, CommandBehavior behaivor = CommandBehavior.Default, params IDataParameter[] paras);

        IDataReader ExecuteReader(string cmdtext, DbParameterBuilder builder, CommandType cmdtype = CommandType.Text, CommandBehavior behaivor = CommandBehavior.Default);

        IDataReader ExecuteReader<T>(string cmdtext, DbParameterBuilder<T> builder, CommandType cmdtype = CommandType.Text, CommandBehavior behaivor = CommandBehavior.Default) where T : IDataParameter, new();

        IDataReader ExecuteReader(IDbCommand cmd, CommandBehavior behaivor = CommandBehavior.Default);
    }
}
